<!--
 * @Descripttion: 
 * @version: 1.0
 * @Author: Sam
 * @Date: 2021-12-01 09:57:01
 * @LastEditors: Sam
 * @LastEditTime: 2021-12-01 17:23:50
-->
{include file="public/header"}
<div class="layui-card">
    <div class="layui-card-body">
        <form class="layui-form padsome" action="">
            <div class="layui-form-item">
                <label class="layui-form-label">密码</label>
                <div class="layui-input-block">
                    <input type="password" name="password" lay-verify="required" autocomplete="off" placeholder="请输入新密码" class="layui-input">
                </div>
                <div class="layui-input-block layui-form-intro">
                    <div class="layui-form-mid layui-word-aux">输入6-32位字符</div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">重复密码</label>
                <div class="layui-input-block">
                    <input type="password" name="re_password" lay-verify="required" autocomplete="off" placeholder="请重复输入密码" class="layui-input">
                </div>
                <div class="layui-input-block layui-form-intro">
                    <div class="layui-form-mid layui-word-aux">请重复输入密码</div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <div class="layui-footer" style="left: 0;">
                        <button class="layui-btn" lay-submit="">立即提交</button>
                        <button class="layui-btn layui-btn-primary" type="button" onclick="close_frame();">返回</button>
                    </div>
                </div>
            </div>
        </form>

    </div>
</div>
{include file="public/footer" /}
<script>
    layui.use(['index', 'form'], function(){
        var $ = layui.$
            ,layer = layui.layer
            ,form = layui.form;

        form.render(null, 'component-form-group');
        /* 监听提交 */
        form.on('submit()', function(data){
            Post('', data.field, function(res) {
                if (res.code == 1) {
                    alert_success(res.msg, function() {
                        close_frame();
                    })
                } else {
                    alert_error(res.msg);
                }
            });
            return false;
        });
    });
</script>